<div class="tales_stats_menu">
    <ui>
        <li class="tales_of_deonia"><?php echo '查询时间段 开始时间:'.$start_date_str.'   结束时间:'.$end_date_str?></li>
    </ui>
</div>

<div class="tales_div_search_main">

    <div class="search_table">
        <table>
            <tr>
                <th style="width: 80px"><?php echo '平台'?></th>
                <th style="width: 80px"><?php echo __('Day of New User')?></th>
                <th style="width: 80px"><?php echo __('Next Day Login User')?></th>
                <th style="width: 80px"><?php echo __('Retention')?></th>
                <th style="width: 80px"><?php echo __('Download Loss User Data')?></th>
            </tr>

            <tr>
                <td class="user_link">
                    <?php echo "UC"; ?>
                </td>
                 <td class="user_link">
                    <?php echo $user_list['CN_UC_CHAR']; ?>
                 </td>
                  <td class="user_link">
                     <?php echo $user_list['CN_UC_RETENTION']; ?>
                  </td>
                  <td class="user_link">
                      <?php echo round($user_list['CN_UC_RETENTION'] / $user_list['CN_UC_CHAR'], 6)*100;
                      echo '%';
                      ?>
                  </td>
                  <td class="user_link">
                     <?php echo $this->Html->link(__('LossuserData'), array('action' => 'downloadLossUserdata','CN_UC',$fgt_day)); ?>
                  </td>
            </tr>

            <tr>
                            <td class="user_link">
                                <?php echo "360"; ?>
                            </td>
                             <td class="user_link">
                                <?php echo $user_list['CN_360_CHAR']; ?>
                             </td>
                              <td class="user_link">
                                 <?php echo $user_list['CN_360_RETENTION']; ?>
                              </td>
                              <td class="user_link">
                                 <?php echo round($user_list['CN_360_RETENTION'] / $user_list['CN_360_CHAR'], 6)*100;
                                                       echo '%';
                                                       ?>
                              </td>
                              <td class="user_link">
                                                   <?php echo $this->Html->link(__('LossuserData'), array('action' => 'downloadLossUserdata','CN_360',$fgt_day)); ?>
                                                </td>
                        </tr>

                        <tr>
                                        <td class="user_link">
                                            <?php echo "BAIDU"; ?>
                                        </td>
                                         <td class="user_link">
                                            <?php echo $user_list['CN_BAIDU_CHAR']; ?>
                                         </td>
                                          <td class="user_link">
                                             <?php echo $user_list['CN_BAIDU_RETENTION']; ?>
                                          </td>
                                          <td class="user_link">
                                           <?php echo round($user_list['CN_BAIDU_RETENTION'] / $user_list['CN_BAIDU_CHAR'], 6)*100;
                                                                 echo '%';
                                                                 ?>
                                        </td>
                                        <td class="user_link">
                                                                                           <?php echo $this->Html->link(__('LossuserData'), array('action' => 'downloadLossUserdata','CN_BAIDU',$fgt_day)); ?>
                                                                                        </td>
                                    </tr>

                                    <tr>
                                        <td class="user_link">
                                            <?php echo "MZW"; ?>
                                        </td>
                                         <td class="user_link">
                                            <?php echo $user_list['CN_MZW_CHAR']; ?>
                                         </td>
                                          <td class="user_link">
                                             <?php echo $user_list['CN_MZW_RETENTION']; ?>
                                          </td>
                                          <td class="user_link">
                                           <?php
                                           if ( $user_list['CN_MZW_CHAR'] != 0)
                                                echo round($user_list['CN_MZW_RETENTION'] / $user_list['CN_MZW_CHAR'], 6)*100;
                                           else
                                                echo '0';
                                                                 echo '%';
                                                                 ?>
                                        </td>
                                        <td class="user_link">
                                                                                                                                   <?php echo $this->Html->link(__('LossuserData'), array('action' => 'downloadLossUserdata','CN_MZW',$fgt_day)); ?>
                                                                                                                                </td>
                                    </tr>

                                    <tr>
                                        <td class="user_link">
                                            <?php echo "RENREN"; ?>
                                        </td>
                                         <td class="user_link">
                                            <?php echo $user_list['CN_RENREN_CHAR']; ?>
                                         </td>
                                          <td class="user_link">
                                             <?php echo $user_list['CN_RENREN_RETENTION']; ?>
                                          </td>
                                          <td class="user_link">
                                           <?php
                                           if ( $user_list['CN_RENREN_CHAR'] != 0)
                                                echo round($user_list['CN_RENREN_RETENTION'] / $user_list['CN_RENREN_CHAR'], 6)*100;
                                           else
                                                echo '0';
                                                                 echo '%';
                                                                 ?>
                                        </td>
                                        <td class="user_link">
                                           <?php echo $this->Html->link(__('LossuserData'), array('action' => 'downloadLossUserdata','CN_RENREN',$fgt_day)); ?>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td class="user_link">
                                            <?php echo "TOTAL"; ?>
                                        </td>
                                         <td class="user_link">
                                            <?php echo $user_list['CN_TOTAL_CHAR']; ?>
                                         </td>
                                          <td class="user_link">
                                             <?php echo $user_list['CN_TOTAL_RETENTION']; ?>
                                          </td>
                                          <td class="user_link">
                                           <?php echo round($user_list['CN_TOTAL_RETENTION'] / $user_list['CN_TOTAL_CHAR'], 6)*100;
                                                                 echo '%';
                                                                 ?>
                                        </td>
                                    </tr>
        </table>

    <div class="tales_stats_menu">
        <ui>
            <li class="tales_of_deonia"><?php echo 'DAY_7 RETENTION Data:  '.'<br />';
                            for($i = 5 ; $i<8; $i++)
                            {
                                echo $this->Html->link(__('  March Day'.$i), array('action' => 'user_retention_7',$i));
                                echo '<br />';
                            };
                             echo '<br />';
                            ?></li>
        </ui>
    </div>



